import { setStore, getStore } from '../router/mUtils'
import { queryParamList } from '../api/param'
/**获取参数*/
const getParam = async (key) => {
  // let sysParam={};
  // let str=getStore('sysParam');
  let data = [];
  // if(!helper.isEmpty(str)){
  //     sysParam=JSON.parse(str);
  //     data=sysParam[key];
  //     if(!helper.isEmpty(JSON.stringify(data))){
  //         return data;
  //     }
  // }
  let res = await queryParamList({ "paramType": key });
  if (res.data != null && res.data.code == '000000') {
    data = res.data.data;
    //sysParam[key]=data;
    //setStore('sysParam',JSON.stringify(sysParam));
  }
  return data;
}

const type = {
  DBTYPE: "pa-db-type",//数据库类型
  DEVFRAME: "pa-dev-frame",//开发框架
  DEVLAN: "pa-dev-lan",//开发语言
  ENV: "pa-env",//开发环境
  DEPLOYCONT: "pa-deploy-cont",//部署容器
}


const status = {
  STATUSYES: 1
}

export default {
  getParam,
  type,
  status
}
